<?php
use yii\helpers\Url;
$this->context->layout = false;
//使用率
echo $this->render("@app/views/public/useRate.php")
?>
<div class="container-fluid">
    <select id="StaffItem" multiple="multiple" data-placeholder="选择用户...">
        <?=$select?>
    </select>
    <button type="button" class="k-button k-button-icontext m_r_btn" id="m-submit" style="margin-top:30px;">&nbsp;提&nbsp;交&nbsp;</button>
</div>
<script>
    var required = $("#StaffItem").kendoMultiSelect({filter: "startswith"}).data("kendoMultiSelect");
    $("#m-submit").click(function (e) {
        $.ajax({
            url : "<?=Url::to(['saveaccredit'])?>",
            data:{staff:required.value()},
            type:"POST",
            dataType:"json",
            success:function(redata){
                if(redata.status==1){
                    var accreditWindow = parent.accreditWindow.data('kendoWindow');
                    accreditWindow.refresh();
                    accreditWindow.close();
                }else{
                    layer.msg(redata.msg, {icon: 5});
                }
            }
        })
    });
</script>